"""
@breif share the pipes
@description
虽然想把这些Pips隐藏起来, 但是就多进程的特点来看, multiprocessing.Pipe返回的
Connection 对象要能够分别被两个进程中的函数访问, 这也就是说, 必然是它们必然是
全局变量. 兴许有办法隐藏起来, 但是会比较麻烦, ddl临近, 先用最简单的全局变量吧.

既然用全局变量了, 把它们集中在一个模块是最简单的保持清晰性的尝试了.

web side:  use conn1
task side: use conn2

@author Stone at BlueNet, GDOU
@date Nov. 2020
"""
from multiprocessing import Pipe


# If duplex is True (the default) then the pipe is bidirectional. 
# If duplex is False then the pipe is unidirectional: conn1 can only be used 
# for receiving messages and conn2 can only be used for sending messages.
conn1_params, conn2_params = Pipe(duplex=True)






